/**
 * 
 */
package com.xbang.attendance.web.action.system.maintenance;

import org.springframework.beans.factory.annotation.Autowired;

import com.xbang.attendance.entity.system.MaintenanceStation;
import com.xbang.attendance.service.SystemService;
import com.demo2do.lighturl.annotation.Action;
import com.xbang.core.struts.support.BaseActionSupport;

/**
 * @author dev.zhang
 * 
 */
public class View extends BaseActionSupport {

	private static final long serialVersionUID = -9163300318514580803L;

	private Integer id;

	private MaintenanceStation maintenanceStation;
	
	@Autowired
	private SystemService systemService;

	/**
	 * 
	 * @return
	 * @throws Exception
	 */
	@Action("/system/maintenance/${id}/view")
	public String view() throws Exception {
		if (null == maintenanceStation && id != null){
			maintenanceStation = (MaintenanceStation) systemService.getObject(MaintenanceStation.class, id);
		}
		return "detail";
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the maintenanceStation
	 */
	public MaintenanceStation getMaintenanceStation() {
		return maintenanceStation;
	}

	/**
	 * @param maintenanceStation the maintenanceStation to set
	 */
	public void setMaintenanceStation(MaintenanceStation maintenanceStation) {
		this.maintenanceStation = maintenanceStation;
	}

	/**
	 * @param systemService the systemService to set
	 */
	public void setSystemService(SystemService systemService) {
		this.systemService = systemService;
	}
	
	

}
